#!/usr/bin/ruby
emails = File.readlines("emails.txt").uniq

open('emails1.txt', 'a') { |f|
for email in emails
f.puts email
end
}